updating oE create_directory

create_directory

include filesys.e 
namespace filesys 
public function create_directory(sequence name, integer mode = 448, integer mkparent = 1) 

creates a new directory.

Parameters:
  1. name : a sequence, the name of the new directory to create
  2. mode : on Unix systems, permissions for the new directory. Default is 448 (all rights for owner, none for others).
  3. mkparent : If true (default) the parent directories are also created if needed.
Returns:

An integer, 0 on failure, 1 on success.

Comments:

mode is ignored on Windows platforms.

Example 1:
if not create_directory("the_new_folder") then 
	crash("Filesystem problem - could not create the new folder") 
end if 
 
-- This example will also create "myapp/" and "myapp/interface/"  
-- if they don't exist. 
if not create_directory("myapp/interface/letters") then 
	crash("Filesystem problem - could not create the new folder") 
end if 
 
-- This example will NOT create "myapp/" and "myapp/interface/"  
-- if they don't exist. 
if not create_directory("myapp/interface/letters",,0) then 
	crash("Filesystem problem - could not create the new folder") 
end if 
See Also:

remove_directory, chdir

Not Categorized, Please Help

Search



Quick Links

User menu

Not signed in.

Misc Menu